<?php
/**
 * Copyright (c) 2006, PORTALIER Julien
 * 
 * Licensed under The LGPL License
 * Redistributions of files must retain the above copyright notice.
 * 
 * @copyright    Copyright (c) 2006, Julien PORTALIER
 * @link         http://code.google.com/p/feather-cm
 * @license      http://www.opensource.org/licenses/lgpl-license.php The LGPL License
 */

# debug & errors
define('DEBUG', 2);
error_reporting(DEBUG ? E_ALL : false);

define('CR', "\r");
define('LF', "\n");
define('CRLF', CR.LF);

define('DOMAIN', $_SERVER['HTTP_HOST']);

# membership is invitation only?
#define('REGISTER_INVITATION_ONLY', true);

class Core
{
	const version = '1.0.0';
	
	# autoload
	const  database    = true; 
	static $libs       = array('http', 'time', 'cookies');
	static $components = array('Config', 'Session', 'Locale', 'Auth', 'Acl', 'Publish');
	static $helpers    = array('xhtml', 'form', 'javascript', 'license');
	static $behaviors  = array();
	
	# Sessions
	const session_auto   = true;
	const session_cookie = 'SESSION_ID';
	const session_expire = '+3 hours';
	const session_path   = '/';
	const session_domain = null;
	const session_string = 'fdcce5a99626576d8a69a93b2d57a924';
	
	# locale
	const charset         = 'UTF-8';
	const locale_default  = 'fr';
	const locale_timezone = 'Europe/Paris';
	
	# groups
	const groups = 'administrator,member,anonymous';
	const admins = 'administrator';
	const default_groups   = 'member';
	const power_privileges = false;
	
	# cache
	const cache_lifetime   = '+1 second';
	const apc_cache_prefix = null;
	
	# Swift (emails)
	const email_charset  = 'ISO-8859-15';
	const email_txt_cmd  = "LC_ALL=:locale elinks -no-connect -no-home -no-numbering -no-references -dump-width 74 -dump :file | cut -c 4-";
#	const swift_protocol = 'SMTP';
#	const swift_options  = '';
#	const swift_username = null;
#	const swift_password = null;
	const swift_protocol = 'Sendmail';
	const swift_options  = '/usr/sbin/sendmail -bs';
}

# charset
ini_set('default_charset', Core::charset);

# mb
mb_language('uni');
mb_internal_encoding(Core::charset);
if(extension_loaded('mbstring'))
	ini_set('mbstring.func_overload', 7);

# gzip output
ob_start("ob_gzhandler");
?>